/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * NewJFrame.java
 *
 * Created on 2011-10-20, 16:01:26
 */
package JavaApplication1;

/**
 *
 * @author mengqingyi
 */
public class LogIn extends javax.swing.JFrame {
	 // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JScrollPane IDInput;
    private javax.swing.JScrollPane pwdInput;
    
    private javax.swing.JLabel IDLabel;
    private javax.swing.JLabel pwdLabel;
    private javax.swing.JLabel rolesLabel;
    
    private javax.swing.JTextPane IDText;
    private javax.swing.JTextPane pwdText;
    
    private javax.swing.JTextField IogInfoInputTip;
    
    private javax.swing.JPanel basePanel;
    
    private javax.swing.JButton cancel;
    private javax.swing.JButton yes;
    
    private javax.swing.JComboBox rolesChoice;
    // End of variables declaration//GEN-END:variables

    /** Creates new form NewJFrame */
    public LogIn() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

    	IDInput = new javax.swing.JScrollPane();
    	pwdInput = new javax.swing.JScrollPane();
    	
    	IDLabel = new javax.swing.JLabel();
        pwdLabel = new javax.swing.JLabel();
        rolesLabel = new javax.swing.JLabel();
        
        IDText = new javax.swing.JTextPane();
        pwdText = new javax.swing.JTextPane();
        
        IogInfoInputTip = new javax.swing.JTextField();
        
        basePanel = new javax.swing.JPanel();
        
        rolesChoice = new javax.swing.JComboBox();
        
        cancel = new javax.swing.JButton();
        yes = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("登录");
        setBackground(new java.awt.Color(209, 192, 244));

        basePanel.setBackground(new java.awt.Color(211, 220, 249));

        IogInfoInputTip.setBackground(new java.awt.Color(211, 220, 249));
        IogInfoInputTip.setFont(new java.awt.Font("方正舒体", 0, 18));
        IogInfoInputTip.setText("请输入您的相关登录信息:");
        IogInfoInputTip.setBorder(null);
        IogInfoInputTip.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                IogInfoInputTipActionPerformed(evt);
            }
        });

        IDLabel.setText("账号：");

        pwdLabel.setText("密码：");

        rolesLabel.setText("登录角色：");

        rolesChoice.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "总店经理", "分店经理", "管理员", "售货员" }));
        rolesChoice.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rolesChoiceActionPerformed(evt);
            }
        });

        IDText.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
        IDInput.setViewportView(IDText);

        pwdText.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
        pwdInput.setViewportView(pwdText);

        cancel.setText("取消");

        yes.setText("登录");

        javax.swing.GroupLayout basePanelLayout = new javax.swing.GroupLayout(basePanel);
        basePanel.setLayout(basePanelLayout);
        basePanelLayout.setHorizontalGroup(
            basePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(basePanelLayout.createSequentialGroup()
                .addGroup(basePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(basePanelLayout.createSequentialGroup()
                        .addGap(32, 32, 32)
                        .addGroup(basePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(basePanelLayout.createSequentialGroup()
                                .addGap(33, 33, 33)
                                .addComponent(yes)
                                .addGap(65, 65, 65)
                                .addComponent(cancel))
                            .addGroup(basePanelLayout.createSequentialGroup()
                                .addGap(7, 7, 7)
                                .addGroup(basePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addGroup(basePanelLayout.createSequentialGroup()
                                        .addGroup(basePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                            .addComponent(pwdLabel)
                                            .addComponent(IDLabel))
                                        .addGap(39, 39, 39))
                                    .addComponent(rolesLabel))
                                .addGap(9, 9, 9)
                                .addGroup(basePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(rolesChoice, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGroup(basePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                        .addComponent(pwdInput, javax.swing.GroupLayout.DEFAULT_SIZE, 99, Short.MAX_VALUE)
                                        .addComponent(IDInput))))))
                    .addGroup(basePanelLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(IogInfoInputTip, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(107, Short.MAX_VALUE))
        );
        basePanelLayout.setVerticalGroup(
            basePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(basePanelLayout.createSequentialGroup()
                .addGap(42, 42, 42)
                .addComponent(IogInfoInputTip, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(35, 35, 35)
                .addGroup(basePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(IDLabel)
                    .addComponent(IDInput, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(17, 17, 17)
                .addGroup(basePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(pwdLabel)
                    .addComponent(pwdInput, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(basePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(rolesLabel)
                    .addComponent(rolesChoice, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(27, 27, 27)
                .addGroup(basePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(yes)
                    .addComponent(cancel))
                .addContainerGap(50, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(basePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(basePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

private void rolesChoiceActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rolesChoiceActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_rolesChoiceActionPerformed

private void IogInfoInputTipActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_IogInfoInputTipActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_IogInfoInputTipActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(LogIn.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(LogIn.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(LogIn.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(LogIn.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new LogIn().setVisible(true);
            }
        });
    }
}
